const Koa = require('koa')
// const {htmlTpl,ejsTpl,pugTpl} = require('./tpl')
// const ejs  = require('ejs')
// const pug  = require('pug')
const views = require('koa-views')
const { resolve } = require('path')
const app = new Koa();

app.use(views(resolve( __dirname, './views'),{
    extension:'pug'
}))


app.use(async (ctx,next) => {
   await ctx.render('index',{
       you:'Luke',
       me:'bigren'
   })

});

app.listen(3000, () => {
    console.log('[demo] server is starting at port 3000');
});
